﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CMP.ERP.DAL;
using CMP.ERP.Model;
using System.Data;

namespace CMP.ERP.BLL
{
    public  class ClientMessageBLL
    {
        /// <summary>
        /// 实例化ClientMessageDAL对象
        /// </summary>
        ClientMessageDAL dal = new ClientMessageDAL();

        /// <summary>
        /// 显示客户管理信息
        /// </summary>
        /// <returns></returns>,
        public DataTable ClientMessageAll()
        {
            return dal.ClientMessageAll();
        }

        /// <summary>
        ///1、删除客户管理信息
        /// </summary>
        /// <param name="HB_Id"></param>
        /// <returns></returns>
        public int ClientMessageDelete(int id)
        {
            return dal.ClientMessageDelete(id);
        }

        /// <summary>
        ///2、 批量删除客户管理信息
        /// </summary>
        /// <param name="Client_Id"></param>
        /// <returns></returns>
        public bool ClientMessageDeleteAll(string Client_Id)
        {
            return dal.ClientMessageDeleteAll(Client_Id);
        }

        /// <summary>
        /// 添加客户管理信息
        /// </summary>
        /// <param name="h"></param>
        /// <returns></returns>
        public int AddClientMessage(ClientMessage c)
        {
            return dal.AddClientMessage(c);
        }

        /// <summary>
        /// 根据客户编号找到客户信息
        /// </summary>
        /// <param name="Client_Id"></param>
        /// <returns></returns>
        public DataTable GetClientMessage(int id)
        {
            return dal.GetClientMessage(id);
        }

        /// <summary>
        /// 修改客户管理信息
        /// </summary>
        /// <param name="client"></param>
        /// <returns></returns>
        public int UptClientMessage(ClientMessage client)
        {
            return dal.UptClientMessage(client);
        }

        /// <summary>
        /// 根据客户名称进行查询
        /// </summary>
        /// <param name="HB_Name"></param>
        /// <returns></returns>
        public DataTable SearchClientMessage(string Client_Name)
        {
            return dal.SearchClientMessage(Client_Name);
        }
    }
}
